package com.zsrd.system.service.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zsrd.system.domain.SysPower;
import com.zsrd.system.domain.SysRole;
import com.zsrd.system.mapper.SysPowerMapper;
import com.zsrd.system.service.SysPowerService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Xxx
 * @since 2023-11-23
 */
@Service
public class SysPowerServiceImpl extends ServiceImpl<SysPowerMapper, SysPower> implements SysPowerService {

    @Override
    public IPage<SysPower> listByPage(SysPower sysPower) {
        Page<SysPower> page = new Page<>();
        page.setCurrent(sysPower.getPageNum());
        page.setSize(sysPower.getPageSize());
        return baseMapper.list(page , sysPower);

    }

    @Override
    public SysPower selectByCode(String powerCode) {
        return  baseMapper.selectByCode(powerCode);

    }

    @Override
    public IPage<SysPower> listAll(SysPower sysPower) {
        Page<SysPower> page = new Page<>();
        page.setCurrent(sysPower.getPageNum());
        page.setSize(sysPower.getPageSize());
        return baseMapper.listAll(page , sysPower);
    }
}
